//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Spreadsheet
{
    public class IgnoredError : IOfficeXmlSerializable
    {
        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            using (ReadContext c = context.Read("ignoredError"))
            {
                sqref = c.GetString("sqref");
                evalError = c.GetOptionalBoolean("evalError", false);
                twoDigitTextYear = c.GetOptionalBoolean("twoDigitTextYear", false);
                numberStoredAsText = c.GetOptionalBoolean("numberStoredAsText", false);
                formula = c.GetOptionalBoolean("formula", false);
                formulaRange = c.GetOptionalBoolean("formulaRange", false);
                unlockedFormula = c.GetOptionalBoolean("unlockedFormula", false);
                emptyCellReference = c.GetOptionalBoolean("emptyCellReference", false);
                listDataValidation = c.GetOptionalBoolean("listDataValidation", false);
                calculatedColumn = c.GetOptionalBoolean("calculatedColumn", false);
            }
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            using (WriteContext c = context.Write("ignoredError"))
            {
                c.SetString("sqref",sqref);
                c.SetOptionalBoolean("evalError", evalError, false);
                c.SetOptionalBoolean("twoDigitTextYear", twoDigitTextYear, false);
                c.SetOptionalBoolean("numberStoredAsText", numberStoredAsText, false);
                c.SetOptionalBoolean("formula", formula, false);
                c.SetOptionalBoolean("formulaRange", formulaRange, false);
                c.SetOptionalBoolean("unlockedFormula", unlockedFormula, false);
                c.SetOptionalBoolean("emptyCellReference", emptyCellReference, false);
                c.SetOptionalBoolean("listDataValidation", listDataValidation, false);
                c.SetOptionalBoolean("calculatedColumn", calculatedColumn, false);
            }
        }
        #endregion
        private string sqref;

        public string SqRef
        {
            get { return sqref; }
            set { sqref = value; }
        }
        private bool evalError;

        public bool EvalError
        {
            get { return evalError; }
            set { evalError = value; }
        }
        private bool twoDigitTextYear;

        public bool TwoDigitTextYear
        {
            get { return twoDigitTextYear; }
            set { twoDigitTextYear = value; }
        }
        private bool numberStoredAsText;

        public bool NumberStoredAsText
        {
            get { return numberStoredAsText; }
            set { numberStoredAsText = value; }
        }
        private bool formula;

        public bool Formula
        {
            get { return formula; }
            set { formula = value; }
        }
        private bool formulaRange;

        public bool FormulaRange
        {
            get { return formulaRange; }
            set { formulaRange = value; }
        }
        private bool unlockedFormula;

        public bool UnlockedFormula
        {
            get { return unlockedFormula; }
            set { unlockedFormula = value; }
        }
        private bool emptyCellReference;

        public bool EmptyCellReference
        {
            get { return emptyCellReference; }
            set { emptyCellReference = value; }
        }
        private bool listDataValidation;

        public bool ListDataValidation
        {
            get { return listDataValidation; }
            set { listDataValidation = value; }
        }
        private bool calculatedColumn;

        public bool CalculatedColumn
        {
            get { return calculatedColumn; }
            set { calculatedColumn = value; }
        }









    }
}
